/**
    Copyright (c) 2010 ATTi 
    All rights reserved.
    Author: Michael Shu
    Date: 8/12/2010
*/

global class BatchUpdateSchedulerDaily implements Schedulable{
	/* To schedule it every day at 12:00am, in Anonymous Blocks and execute below commands
	In Live:
	   BatchUpdateSchedulerDaily b0 = new BatchUpdateSchedulerDaily();
	   String sch0 = BatchUpdateSchedulerDaily.CRON_EXP0;
	   System.schedule('Schedule Batch Update Account Team Job0', sch0, b0);
	   
	For Test, Stage, execute below only for test purpose:
	   BatchUpdateSchedulerDaily b0 = new BatchUpdateSchedulerDaily();
	   String sch0 = '0 00 * * * ?';
	   System.schedule('Schedule Batch Update Account Team Job0', sch0, b0);
	   
	   BatchUpdateSchedulerDaily b2 = new BatchUpdateSchedulerDaily();
	   String sch2 = '0 30 * * * ?';
	   System.schedule('Schedule Batch Update Account Team Job2', sch2, b2);
	*/
	
	public static String CRON_EXP0  = '0 00 0 * * ?';
		
	global BatchUpdateSchedulerDaily(){
    }
    
	global void execute (SchedulableContext SC){
		BatchUpdateAccountTeam clean_acct = new BatchUpdateAccountTeam(BatchUpdateAccountTeam.CleanAccountTeam);
		Id clean_acct_id = database.executebatch(clean_acct);
	}
}